home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / com / others / figlest / man / figlet.man < prev    next >
Encoding:
Text File  |  1994-11-26  |  18.7 KB  |  379 lines

  1. E
  2. NAME
  3.         figlet  -  print  in large characters made up of ordinary screen
  4.         characters
  5. SYNOPSIS
  6.         figlet [ -clnptvDEF ] [ -m smushmode ] [ -w outputwidth ]
  7.              [ -d fontdirectory ] [ -f fontfile ] [ -o outputfile ]
  8.  
  9. DESCRIPTION
  10.         figlet prints its input using large characters made  up  of  or-
  11.         dinary screen  characters.   figlet output is generally reminis-
  12.         cent of the sort of ``signatures'' many people like  to  put  at
  13.         the end of e-mail and UseNet messages, and is oriented normally,
  14.         not sideways as in many banner programs.
  15.         figlet can print in a variety of fonts, with adjacent characters
  16.         ``smushed'' together  in  various ways.  figlet fonts are stored
  17.         in separate files, which can be identified by the suffix ``.flf.
  18.         figlet Most figlet font files will be stored in figlet's default
  19.         font directory.
  20.  
  21. OTHER FONT FILES & MAILING LIST
  22.         You can get many fonts which are not in the basic Figlet package
  23.         by    anonymous    ftp    from     ftp.isu.edu:pub/figlet/fonts.
  24.         ftp.isu.edu:pub/figlet should also contain the latest version of
  25.         figlet and  other  utilites  related  to figlet.  Of special in-
  26.         terest are non-Roman fonts.  As of writing, there are Hebrew and
  27.         Russian fonts, but more are expected.
  28.         There is also a  mailing  list  associated  with  Figlet,  where
  29.         software  upgrades,  new fonts, and discussion about figlet take
  30.         place.  (You can set it so that you see only the topic you want,
  31.         eg.  if you don't want to read  the  discussions  but  are  only
  32.         interested  in  the upgrade notices, or new fonts.) To subscribe
  33.         to this mailing list, send  email  to  listserv@vmd.cso.uiuc.edu
  34.         with  the message "subscribe figlet-l YOUR NAME" where YOUR NAME
  35.         should be replaced with your name.
  36.  
  37. USAGE
  38.         Just start up figlet (type ``figlet) and then type whatever  you
  39.         want.   Alternatively, pipe a file or the output of another com-
  40.         mand through figlet.  See EXAMPLES for other things to do.
  41.  
  42. OPTIONS
  43.         figlet reads command line options from left to right,  and  only
  44.         the last  option that affects a parameter has any effect.  Every
  45.         option (except -v and -F) has an inverse, so that, for  example,
  46.         if  figlet  is  customized with a C-shell alias, all the options
  47.         are still available.
  48.  
  49.         -c
  50.  
  51.         -l -c centers the output horizontally.  -l puts it back to left-
  52.         justified (default).
  53.  
  54.         -d fontdirectory Change the default font directory.  figlet looks
  55.         for fonts first in the default directory and then in the current
  56.         directory.  If the -d option is not specified, figlet  uses  the
  57.         directory that  was specified when it was compiled.  To find out
  58.         which directory this is, use the -F option.
  59.  
  60.         -f fontfile Select the font.  The .flf suffix may be left off  of
  61.         fontfile, in which case figlet automatically appends it.  figlet
  62.         looks  for the file first in the default font directory and then
  63.         in the current directory, or, if fontfile was given  as  a  full
  64.         pathname, in the given directory.
  65.         
  66.         -o outputfile Choose a file that figlet will output the text to.
  67.         Added for the Atari by Richard Morris.
  68.  
  69.         -woutputwidth Sets the outputwidth to the given integer.  figlet
  70.         uses the outputwidth to determine when to break lines and how to
  71.         center the  output.  Normally, figlet assumes 80 columns so that
  72.         people with wide terminals won't annoy the  people  they  e-mail
  73.         figlet output to.  -w and -t override each other.
  74.  
  75.         -msmushmode  Specifies  how  figlet should ``smush'' consecutive
  76.         characters together.  This option is rarely needed, as a  figlet
  77.         font  file  specifies  the  best smushmode to use with the font.
  78.         smushmode can be one of:
  79.  
  80.         -2 Get mode from font file (default).  Every  figlet  font  file
  81.         specifies the best smushmode to use with the font.  This will be
  82.         one of the following smushmodes (-1 through 63).
  83.  
  84.         -1 No smushing.  Characters are simply concatenated together.
  85.         In  any  non-negative  smushmode  figlet  pushes  adjacent  font
  86.         characters together until their non-blank portions  touch.    At
  87.         that  point,  it  may  or may not push the two font characters 1
  88.         screen character closer, depending on the  smushmode.    Pushing
  89.         font  characters  one step closer requires ``smushing'' two non-
  90.         blank screen characters into a single screen character.   figlet
  91.         has  6 ways of doing this, represented by 1, 2, 4, 8, 16 and 32.
  92.         The various non-negative smushmodes (0-63) are obtained  by  ad-
  93.         ding up the numbers corresponding to the sort of smushing figlet
  94.         should do.
  95.  
  96.         1 Smush  equal  characters.    Two screen characters are smushed
  97.         into a single character if they are the  same.    The  resulting
  98.         character is  the same as both of the original characters.  This
  99.         mode does not smush the character known as a hardblank, which is
  100.         a character that prints as a blank, but is not  smushed  (except
  101.         in   mode  32).  See  FONTFILEFORMAT  for  more  information  on
  102.         hardblanks.
  103.  
  104.         2 Smush underscores.  An underscore will be  smushed  into  (and
  105.         replaced by) any of ``|/\[]{}()<>''.
  106.  
  107.         4 Hierarchy  smushing.   Smushes certain characters together ac-
  108.         cording to a hierarchy  containing  6  classes:  ``|'',  ``/\'',
  109.         ``[]'', ``{}'',  ``()'',  ``<>''.   A member of any class can be
  110.         smushed into and replaced by a member of any later class.
  111.  
  112.         8 Opposite pair smushing, type I.    Smushes  opposing  brackets
  113.         (``[]''),  braces  (``{}'')  and  parentheses (``()'') together,
  114.         replacing them with a vertical bar (`|').
  115.  
  116.         16 Opposite pair smushing, type II.   Smushes  opposing  slashes
  117.         (``/\'') and less-than/greater-than (``<>'') together, replacing
  118.         them with an upper-case `X'.
  119.  
  120.         32 Hardblank smushing.  Smushes two hardblanks together, replac-
  121.         ing them  with  a single hardblank.  See FONTFILEFORMAT for more
  122.         information on hardblanks.
  123.  
  124.         -p
  125.  
  126.         -n -p puts figlet into paragraph  mode,  which  eliminates  some
  127.         spurious  line  breaks  when  piping  a  multi-line file through
  128.         figlet.  In paragraph mode, figlet treats line breaks  within  a
  129.         paragraph   as   if  they  were  merely  blanks  between  words.
  130.         (Specifically, -p causes figlet to convert any newline which  is
  131.         not  preceded by a newline and not followed by a space character
  132.         into a blank.) -n puts figlet back to normal (default), in which
  133.         every newline figlet reads causes it to produce a line break.
  134.  
  135.         -t Sets the outputwidth to the terminal width.  If the  terminal
  136.         width  is  not  known,  the  previous  outputwidth  is retained.
  137.         figlet uses the outputwidth to determine when to break lines and
  138.         how to center the output.  Normally, figlet assumes  80  columns
  139.         so  that  people with wide terminals won't annoy the people they
  140.         e-mail figlet output to.  -w and -t override each other.
  141.  
  142.         -v Prints  out  the  version  and  copyright  information,  then
  143.         exits.
  144.  
  145.         -D
  146.  
  147.         -E -D  switches  to  the  German (Deutsch) character set.  Turns
  148.         `[', `\' and `]' into umlauted A, O and U, respectively.    `{',
  149.         `|'  and  `}'  turn  into  the respective lower case versions of
  150.         these.  `~' turns  into  s-z.    -E  switches  back  to  English
  151.         (default). No other character sets are currently supported.
  152.  
  153.         -F  Displays  the  name of the default font and the default font
  154.         directory, along with the names  of  the  figlet  fonts  in  the
  155.         default directory, then exits.  (This will reflect any change of
  156.         the default directory with the -d option, as long as -d is given
  157.         before the -F).
  158.  
  159. EXAMPLES
  160.         To use figlet with its default settings, simply type
  161.                 
  162.                 
  163.                 example% figlet
  164.                 
  165.                 
  166.         and then type whatever you like.
  167.         Use the -c option if you would prefer centered output:
  168.                 
  169.                 
  170.                 example% figlet -c
  171.                 
  172.                 
  173.         To change the font, use the -f option, for example,
  174.                 
  175.                 
  176.                 example% figlet -f script
  177.                 
  178.                 
  179.         To  see  what fonts are available in the default font directory,
  180.         use -F:
  181.                 
  182.                 
  183.                 example% figlet -F
  184.                 
  185.                 
  186.         We have found the most common usage of figlet to  be  making  up
  187.         large text  to  be  placed in e-mail messages.  For this reason,
  188.         figlet defaults to 80 column output.  If you are using  a  wider
  189.         terminal,  and  would  like figlet to use the full width of your
  190.         terminal, use the -t option:
  191.                 
  192.                 
  193.                 example% figlet -t
  194.                 
  195.                 
  196.         If figlet gets its input from a file, it is often a good idea to
  197.         use -p:
  198.                 
  199.                 
  200.                 example% figlet -p < myfile
  201.                 
  202.                 
  203.         Of course, most of the above can be combined:
  204.                 
  205.                 
  206.                 example% figlet -ptf shadow < anotherfile
  207.                 example% figlet -cf slant
  208.                 
  209.                 
  210.  
  211.         Other Things to Try
  212.  
  213.         On many systems nice effects can be obtained from the lean  font
  214.         by piping  it  through  tr.   Some you might want to try are the
  215.         following:
  216.                 
  217.                 example% figlet -f lean | tr ' _/' ' ()'
  218.                 example% figlet -f lean | tr ' _/' './\\'
  219.                 example% figlet -f lean | tr ' _/' ' //'
  220.                 example% figlet -f lean | tr ' _/' '/  '
  221.                 
  222.         Similar things can be done with the block font.
  223.  
  224. FONT FILE FORMAT
  225.         If you would like to design a figlet font, it is usually best to
  226.         begin with an already-existing font.  Except for the first  line
  227.         of a  font  file, most of the file format should be obvious.  If
  228.         you design a font, please let us know about it!    (See  AUTHORS
  229.         for e-mail addresses.)
  230.         A figlet font filename must have the suffix ``.flf.
  231.         A figlet font file begins with a header.  The header consists of
  232.         one  line giving information about the font, followed by zero or
  233.         more comment lines, which figlet ignores.  Following the  header
  234.         is the font data.
  235.  
  236.         The Header
  237.  
  238.         The first line of a figlet font file is of the following form:
  239.                 flf2ahardblank height up_ht maxlen smushmode cmt_count
  240.         for example:
  241.                 
  242.                 flf2a$ 6 5 20 15 1
  243.                 
  244.         The  first  five  characters  of  a font file should be ``flf2a.
  245.         ``flf2 is the magicnumber of a figlet 2 font  file.    The  next
  246.         character (`a)  is  currently ignored.  It may mean something in
  247.         future versions of figlet.  If/when it does,  you  can  be  sure
  248.         your fonts will still work if this character is `a.
  249.         Immediately  following  this  is the hardblank (character). Note
  250.         that there are no blanks  between  ``flf2a  and  the  hardblank.
  251.         figlet  can  smush  together  consecutive  characters in various
  252.         ways.  Normally, any character can be smushed into a blank.    A
  253.         hardblank  prints  as  a  blank,  but cannot be smushed into any
  254.         character except a blank,  and,  if  smushmode  32  is  enabled,
  255.         another hardblank.  (For example, the `r' in script.flf contains
  256.         a hardblank,  `$'  in  that font.  To see why this is necessary,
  257.         create a copy of script.flf with this hardblank  replaced  by  a
  258.         blank.  In this new font, the ``tr'' combination looks awful.)
  259.         By convention, the hardblank is a `$', but it can be any charac-
  260.         ter besides  blank,  newline  and  null.  If you want the entire
  261.         printing ASCII set  available  to  use,  make  the  hardblank  a
  262.         <delete> character.
  263.         Then  comes  the  height (integer). This is the number of screen
  264.         lines high that each character in the font is.
  265.         up_ht (integer) is the number of lines from the  baseline  of  a
  266.         character to the top of the character, i.e., it is the height of
  267.         a character,  ignoring any descenders.  This number is currently
  268.         ignored by figlet, but future versions may use it.
  269.         maxlen (integer) is the maximum length of a  line  in  the  font
  270.         file (excluding the first line and the comments lines, which can
  271.         be as long as you want).  You are free to make this a little (or
  272.         alot) too  large  as  a  safety  measure.    As  an added safety
  273.         measure, figlet adds a fudge factor to maxlen.
  274.         smushmode (integer)  determines  how  much  figlet  smushes  the
  275.         font.  Possible smushmodes are -1 through 63.  Typically, you'll
  276.         want  to  use -1 (no smushing), 0 (push font characters together
  277.         until they touch) or  15  (smush  various  pairs  of  characters
  278.         together into   single   characters).    To  try  out  different
  279.         smushmodes with your font, use the -m command-line option.   See
  280.         OPTIONS  for  a  more  detailed explanation of these smushmodes.
  281.         (Note that a smushmode of -2 can be given on the  command  line,
  282.         but not in a font file.)
  283.         Between the first line and the actual characters of the font are
  284.         the comment  lines.    Cmt_count  specifies how many lines there
  285.         are.  These lines are optional, may be as long as you want,  and
  286.         are ignored by figlet.
  287.         Thus,  a  complete  figlet  font file header will look something
  288.         like the following:
  289.                 
  290.                 flf2a$ 6 5 20 15 1
  291.                 Example by Glenn Chappell 7/93
  292.                 
  293.  
  294.         The Font Data
  295.  
  296.         The font data begins on the next line  after  the  comments  and
  297.         continues to  the  end  of the file.  The characters from ` ' to
  298.         `~' are given in standard ASCII order,  followed  by  the  extra
  299.         German  characters: umlauted `A', `O', `U', `a', `o' and `u' and
  300.         s-z.  Each character uses height lines, where height  was  given
  301.         on the  first line of the font file.  The characters in the file
  302.         are given exactly as  they  should  be  printed  out,  with  two
  303.         exceptions:  (1)  hardblanks  should be the hardblank character,
  304.         not a blank, and (2) every line has an endmark character.
  305.         In most figlet fonts, the endmark is either `@' or '#'.   figlet
  306.         eliminates  the  last block of consecutive equal characters from
  307.         each line (other than the header lines) when the  file  is  read
  308.         in.   By  convention,  the  last  line of a font character has 2
  309.         endmarks, while all the rest have one.  This makes  it  easy  to
  310.         see where  characters  begin  and end.  No line should have more
  311.         than 2 endmarks.
  312.         It is very important that every character in a font has the same
  313.         height, and, once the endmarks are removed, that all  the  lines
  314.         constituting a  single  font character have the same length.  Be
  315.         careful also that no  lines  in  the  font  file  have  trailing
  316.         blanks, as figlet will take these to be the endmarks.
  317.         If  you  don't  want  to define all the characters, make the un-
  318.         defined characters empty,  i.e.,  each  line  of  the  character
  319.         should consist only of an endmark.
  320.         The   blank   character  should  usually  be  made  entirely  of
  321.         hardblanks.  (Some slanted fonts are an exception.)
  322.         Again, if you design a font, please let us know!
  323.  
  324. FILES
  325.  
  326.         file.flf figlet font file
  327.  
  328. DIAGNOSTICS
  329.         figlet's  diagnostics  are  intended  to  be   self-explanatory.
  330.         Possible messages are
  331.                 
  332.                 Usage: ...
  333.                 Out of memory
  334.                 Unable to open font file
  335.                 Not a Figlet 2 font file
  336.                 Unable to open directory
  337.                 
  338.                 "-t" is disabled, since ioctl is not fully implemented.
  339.                 
  340.         This  last  message  is printed when the -t option is given, but
  341.         the operating system in use does not  include  the  system  call
  342.         figlet uses to determine the terminal width.
  343.  
  344. ORIGIN
  345.         ``figlet stands for ``Frank, Ian and Glenn's LETters''. Inspired
  346.         by Frank's
  347.  .sig, Glenn wrote (most of) it, and Ian helped.
  348.         Most  of the figlet fonts were inspired by signatures on various
  349.         UseNet articles.  Since typically hundreds  of  people  use  the
  350.         same  style  of  letters  in their signatures, it was not deemed
  351.         necessary to give credit to any one font designer.
  352.  
  353. BUGS
  354.         Very little error checking is done on font files.  While  figlet
  355.         tries  to  be  forgiving of errors, and should (hopefully) never
  356.         actually crash, using an  improperly-formatted  font  file  with
  357.         figlet will produce unpredictable output.
  358.         figlet  does  not  handle  formatting  characters  in a very in-
  359.         telligent way.  A tab character is converted  to  a  blank,  and
  360.         vertical-tab,  form-feed  and carriage-return are each converted
  361.         to a newline.  On many systems, tabs can be  handled  better  by
  362.         piping files through expand before piping through figlet.
  363.         figlet   output   is   quite  ugly  if  it  is  displayed  in  a
  364.         proportionally-spaced font.  I suppose this is to be expected.
  365.  
  366. AUTHORS
  367.         Glenn Chappell <ggc@uiuc.edu> did most of the  work.    You  can
  368.         e-mail him  but he is not an e-mail fanatic...  people who email
  369.         Glenn will probably get answers,  but  if  you  email  his  best
  370.         friend:
  371.         Ian  Chai  <spectre@uiuc.edu>  (or  figlet@uiuc.edu),  who is an
  372.         e-mail fanatic, you'll get answers, endless  conversation  about
  373.         the  mysteries  of  life,  invitations  to join some 473 mailing
  374.         lists and a free  toaster.    (Well,  ok,  maybe  not  the  free
  375.         toaster.)
  376.         Frank inspired this whole project with his .sig, but don't email
  377.         him...  he's decidedly an un-email-fanatic.
  378.  
  379.